package com.wootide.cms.service.facility.room.roominfo.pojo;

import java.util.Set;

import com.wootide.cms.service.facility.room.roomtype.pojo.RoomTypeInfo;

/**
 * 房间信息POJO
 * 〈一句话功能简述〉
 * 〈功能详细描述〉
 * @author ozm
 * @version 2013-3-8
 * @see RoomInfo
 * @since 2013-3-8下午4:36:31
 */
public class RoomInfo implements java.io.Serializable,Comparable<RoomInfo>
{
    /**
     * 意义，目的和功能，以及被用到的地方<br>
     */
    private static final long serialVersionUID = 1L;

    //房间ID
    private Integer innerIndex;
    
    //房间类型信息
    private RoomTypeInfo roomTypeInfo;
    
    //房间名称
    private String roomName;
    
    //房间号
    private String roomNum;
    
    //房间原价
    private Double originalPricePerRoom;
    
    //楼层
    private Integer floor;
    
    //房间状态
    private Integer roomStatus;
    
    //房间描述
    private String roomDesc;
    
    //折扣价格
    private double discountPrice;
    
    //时段字符传信息
    private String periodStr;
    
    //设备信息表
    @SuppressWarnings("rawtypes")
    private Set deviceInfos;
    
    //房间时段表
    @SuppressWarnings("rawtypes")
    private Set roomPeriods;
    
    //桌次信息集合
    @SuppressWarnings("rawtypes")
    private Set tableNoInfos;

    /* 实现 Comparable 接口中的 compareTo 方法，
     * 通常大于时返回一个正数，小于时返回一个负数，
     * 等于时返回零，具体情况可以自行决定。
     *********************************************************
     * 这里我根据 索引的大小进行了比较。由于 TreeSet
     * 会根据 compareTo 的结果来排序，因此输出结果
     * 应该是按照 索引从小到大排序的。
     * 如果要根据姓名进行排序，只需对这个方法进行相应的修改。*/

    public int compareTo(RoomInfo arg) 
    {
           return this.roomNum.compareToIgnoreCase(arg.getRoomNum());
                    
    }

    /**
     * toStirng
     */
    public String toString()
    {
        return "RoomInfo [innerIndex=" + innerIndex + ", roomTypeInfo="
                + roomTypeInfo + ", roomName=" + roomName + ", roomNum="
                + roomNum + ", originalPricePerRoom=" + originalPricePerRoom
                + ", floor=" + floor + ", roomStatus=" + roomStatus
                + ", roomDesc=" + roomDesc + ", discountPrice=" + discountPrice
                + "]";
    }

    public String getPeriodStr()
    {
        return periodStr;
    }


    public void setPeriodStr(String periodStr)
    {
        this.periodStr = periodStr;
    }


    public Double getOriginalPricePerRoom()
    {
        return originalPricePerRoom;
    }

    public void setOriginalPricePerRoom(Double originalPricePerRoom)
    {
        this.originalPricePerRoom = originalPricePerRoom;
    }

    public Integer getFloor()
    {
        return floor;
    }

    public void setFloor(Integer floor)
    {
        this.floor = floor;
    }

    public Integer getInnerIndex()
    {
        return innerIndex;
    }

    public void setInnerIndex(Integer innerIndex)
    {
        this.innerIndex = innerIndex;
    }

    public RoomTypeInfo getRoomTypeInfo()
    {
        return roomTypeInfo;
    }

    public void setRoomTypeInfo(RoomTypeInfo roomTypeInfo)
    {
        this.roomTypeInfo = roomTypeInfo;
    }

    public String getRoomName()
    {
        return roomName;
    }

    public void setRoomName(String roomName)
    {
        this.roomName = roomName;
    }

    public double getDiscountPrice()
    {
        return discountPrice ;
    }

    public void setDiscountPrice(double discountPrice)
    {
        this.discountPrice = discountPrice;
    }

    public String getRoomNum()
    {
        return roomNum;
    }

    public void setRoomNum(String roomNum)
    {
        this.roomNum = roomNum;
    }

    public Integer getRoomStatus()
    {
        return roomStatus;
    }

    public void setRoomStatus(Integer roomStatus)
    {
        this.roomStatus = roomStatus;
    }

    public String getRoomDesc()
    {
        return roomDesc;
    }

    public void setRoomDesc(String roomDesc)
    {
        this.roomDesc = roomDesc;
    }   

    @SuppressWarnings("rawtypes")
    public Set getDeviceInfos()
    {
        return deviceInfos;
    }

    @SuppressWarnings("rawtypes")
    public void setDeviceInfos(Set deviceInfos)
    {
        this.deviceInfos = deviceInfos;
    }

    @SuppressWarnings("rawtypes")
    public Set getRoomPeriods()
    {
        return roomPeriods;
    }

    @SuppressWarnings("rawtypes")
    public void setRoomPeriods(Set roomPeriods)
    {
        this.roomPeriods = roomPeriods;
    }

    @SuppressWarnings("rawtypes")
    public Set getTableNoInfos()
    {
        return tableNoInfos;
    }

    @SuppressWarnings("rawtypes")
    public void setTableNoInfos(Set tableNoInfos)
    {
        this.tableNoInfos = tableNoInfos;
    }
   
}